package net.elive.bean;

import net.elive.tools.Pmd52f;

/**
 * 多媒体数据库
 * @author jin_cool.cao
 *
 */
public class MediaDataBase {
	private byte[] md;
	private int hashcode;
	public MediaDataBase(byte[] md){
		this.md=md;
		hashcode=Pmd52f.byteArrayToHexString(md).hashCode();
	}


	@Override
	public int hashCode() {
		return hashcode;
	}
	/**
	 * 判断两个字节数组是否相等
	 */
	@Override
	public boolean equals(Object obj) {
		MediaDataBase mi=(MediaDataBase)obj;
		boolean b=true;
		if(mi!=null){
			for(int i=0;i<16;i++){
				if(mi.md[i]!=md[i]){
					b=false;
					break;
				}
			}
			return b;
		}else{
			return false;
		}
	}
	
	
}
